package march.firstmarch22.march01;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

public class Mapper01 extends Mapper<LongWritable, Text,Text,Text> {
    @Override
    protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {

        //computer,huangxiaoming,85,86,41,75,93,42,85
        String[] split = value.toString().split(",");
        String courseName = split[0];

        context.write(new Text(courseName),value);
    }
}
